package com.paomi.client.activity.takeTicket;

import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.paomi.client.activity.takeTicket.model.TicketPersonBean;
import com.paomi.client.net.Api;
import com.paomi.client.net.BaseCallback;
import com.paomi.client.net.Constants;

import java.util.HashMap;
import java.util.Map;

import retrofit2.Call;

/**
 * Created by pc on 2018/11/13
 * Describe:取票人信息列表
 * com.paomi.client.activity.takeTicket
 */
public class TakeTicketListPresenter extends MvpBasePresenter<TakeTicketListView> {
    /**
     * 实质购票人列表
     * @param page
     */
    public void getTicketPersonList(int page){
        Map<String,String> map=new HashMap<>();
        map.put("pageNum",""+page);
        map.put("pageSize",""+Constants.PAGE_SIZE);
        Api.getInstanceService(Constants.User_URL).getTicketTakePay(map).enqueue(new BaseCallback<TicketPersonBean>() {
            @Override
            public void onResponse(Call<TicketPersonBean> call, TicketPersonBean result) {
                getView().setPersonList(result);
            }
        });
    }
}
